#include "widget.h"
#include "ui_widget.h"
#include <QShortcut>
Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);

    ui->comboBox_2->addItem("鸡腿堡1");
    ui->comboBox_2->addItem("鸡腿堡2");
    ui->comboBox_2->addItem("鸡腿堡3");

    ui->comboBox_3->addItem("薯条1");
    ui->comboBox_3->addItem("薯条2");
    ui->comboBox_3->addItem("薯条3");


    ui->comboBox_4->addItem("可乐");
    ui->comboBox_4->addItem("雪碧");



    QShortcut* shortcut = new QShortcut(this);
    shortcut->setKey(QKeySequence("+"));
    connect(shortcut,&QShortcut::activated,this,&Widget::handle);
}

Widget::~Widget()
{
    delete ui;
}

void Widget::handle()
{
    ui->spinBox_2->setValue(ui->spinBox_2->value()+1);
}

